/* 
 * File:   FoodItem.h
 * Author: Macaire
 *
 * Created on October 6, 2012, 3:24 AM
 */

#ifndef FOODITEM_H
#define	FOODITEM_H

#include <iostream>
using namespace std;

class FoodItem{
public:
    FoodItem();
    void setPrice();
    double getPrice();
    void setCount();
    int getCount();
    void setWeight();
    int getWeight();
    void setName();
    string getName();
private:
    int count, weight;
    double price;
    string name;
};

FoodItem::FoodItem(){
    setName();
    setPrice();
    setCount();
    setWeight();
}
void FoodItem::setCount(){
    cout<<"How many "<<getName()<<"? "<<endl<<"Enter an whole number!"<<endl;
    cin>>count;
    cout<<endl;
}
int FoodItem::getCount(){
    return count;
}
void FoodItem::setPrice(){
    cout<<"How much do " <<getName()<<" cost? "<<endl
            <<"Don't enter any spaces or dollar signs"<<endl;
    cin>>price;
    cout<<endl;
}
double FoodItem::getPrice(){
    return price;
}
void FoodItem::setWeight(){
    cout<<"How much do " <<getName()<<" weigh? "<<endl
            <<"Enter a whole number!"<<endl;
    cin>>weight;
    cout<<endl;
}
int FoodItem::getWeight(){
    return weight;
}
void FoodItem::setName(){
    cout<<"What item did you get from the grocery store? "<<endl
            <<"No spaces!"<< endl;
    cin>>name;
    cout<<endl;
}
string FoodItem::getName(){
    return name;
}

#endif	/* FOODITEM_H */

